<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="js/autostart/ajax_config.js"></script>
<script src="js/templates/entry.js"></script>
<script src="js/modules/main_content.js"></script>
<script src="js/loaders/entries.js"></script>
<script type="text/javascript">
	(function() {
	  function numpf(n, s, t) {
	    // s - 2-4, 22-24, 32-34 ...
	    // t - 5-21, 25-31, ...
	    var n10 = n % 10;
	    if ( (n10 > 1) && (n10 < 5) && ( (n > 20) || (n < 10) ) ) {
	      return s;
	    } else {
	      return t;
	    }
	  }
	
	  jQuery.timeago.settings.strings = {
	    prefixAgo: null,
	    prefixFromNow: "za",
	    suffixAgo: "temu",
	    suffixFromNow: null,
	    seconds: "mniej niż minutę",
	    minute: "minutę",
	    minutes: function(value) { return numpf(value, "%d minuty", "%d minut"); },
	    hour: "godzinę",
	    hours: function(value) { return numpf(value, "%d godziny", "%d godzin"); },
	    day: "dzień",
	    days: "%d dni",
	    month: "miesiąc",
	    months: function(value) { return numpf(value, "%d miesiące", "%d miesięcy"); },
	    year: "rok",
	    years: function(value) { return numpf(value, "%d lata", "%d lat"); }
	  };
	})();

	$(function(){
		AJAXConfiguration.init();
		MainContent.init($("#content"));
		
		$("#load_entry_template").click(function(){
			//var $content = $("#content");
			//$content.children().detach();
			//MainContent.clear();
			MainContent.prepend(EntryTemplate.normal());
			MainContent.show();
			//$content.append(EntryTemplate.normal());
		});
	})
</script>

</head>
<body>
	<button id="load_entry_template">Load Entry template</button>
	
	<div id="content"></div>
	
	<div id="progress">
		<img id="preloader" src="img/preloader.gif" height="42" width="42">
	</div>
</body>
</html>